package ibm_package;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ConfigServ extends HttpServlet {
	private static final long serialVersionUID = 1L;
    private ServletConfig conf;   
    public ConfigServ() {
        super();
        // TODO Auto-generated constructor stub
    }
    
    public void init(ServletConfig xconfg) throws ServletException{
    	conf = xconfg;
    	
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String name = conf.getInitParameter("userName");
		String password = conf.getInitParameter("password");
		String dbAddress = conf.getInitParameter("database address");
		
		PrintWriter out = response.getWriter();
		out.println("UserName : "+name+"<br/> Password : "+password+"<br/> dbAddress : "+dbAddress);
		
		
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
